<?php
/*
继承模块
*/
namespace Home\Controller;

use Think\Controller;

class CommonController extends Controller{

  public function _initialize(){
		$this->checkLogin();
	}

  protected function jsonReply($code,$message,$data=array(),$json_option = 0){
    $arr['ResultCode'] = $code;
    $arr['ResultMessage'] = $message;
    if(!empty($data)){
      $arr['ResultBody'] = $data;
    }
    exit(json_encode($arr, $json_option));
}


private function checkLogin(){
		$user_auth = session('USER_AUTH');
		if(!is_array($user_auth)){
			$this->redirect('Login/index');
		}
	}












}
